#!/usr/bin/env python3

def gen():
    print("gen start")
    yield 99
    print("gen yield 1")
    yield 199
    print("gen yield 2")
    yield 1999
    print("gen yield 3")
    yield 19999

def myrange(num):
    i = 0
    while i < num:
        yield i
        i += 1

def main():
    s = gen()

    for i in myrange(10):
        print(i)

    #  range(100000000000)

    #  print(type(s))
    #  print(next(s))
    #  print(next(s))
    #  print(next(s))
    #  print(next(s))
    #  print(next(s))

if __name__ == "__main__":
    main()
